NXP Semiconductors /LPC15xx /USART0 /CFG

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as CFG

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (DISABLED)ENABLE 0RESERVED 0 (7_BIT_DATA_LENGTH)DATALEN 0 (NO_PARITY)PARITYSEL 0 (1_STOP_BIT)STOPLEN 0 (UART_USES_STANDARD_C)MODE32K 0RESERVED 0 (NO_FLOW_CONTROL)CTSEN 0RESERVED 0 (ASYNCHRONOUS_MODE_IS)SYNCEN 0 (FALLING_EDGE)CLKPOL 0RESERVED 0 (SLAVE)SYNCMST 0 (NORMAL_OPERATION)LOOP 0RESERVED 0 (DISABLED)OETA 0 (DISABLED)AUTOADDR 0 (STANDARD)OESEL 0 (LOW)OEPOL 0 (STANDARD)RXPOL 0 (STANDARD)TXPOL 0RESERVED

TXPOL=STANDARD, CTSEN=NO_FLOW_CONTROL, OESEL=STANDARD, PARITYSEL=NO_PARITY, SYNCMST=SLAVE, RXPOL=STANDARD, OETA=DISABLED, LOOP=NORMAL_OPERATION, STOPLEN=1_STOP_BIT, OEPOL=LOW, ENABLE=DISABLED, AUTOADDR=DISABLED, SYNCEN=ASYNCHRONOUS_MODE_IS, CLKPOL=FALLING_EDGE, MODE32K=UART_USES_STANDARD_C, DATALEN=7_BIT_DATA_LENGTH

Description

USART Configuration register. Basic USART configuration settings that typically are not changed during operation.

Fields

ENABLE

USART Enable.

0 (DISABLED): Disabled. The USART is disabled and the internal state machine and counters are reset. While Enable = 0, all USART interrupts and DMA transfers are disabled. When Enable is set again, CFG and most other control bits remain unchanged. For instance, when re-enabled, the USART will immediately generate a TxRdy interrupt (if enabled in the INTENSET register) or a DMA transfer request because the transmitter has been reset and is therefore available.

1 (ENABLED): Enabled. The USART is enabled for operation.

RESERVED

Reserved. Read value is undefined, only zero should be written.

DATALEN

Selects the data size for the USART.

0 (7_BIT_DATA_LENGTH): 7 bit Data length.

1 (8_BIT_DATA_LENGTH): 8 bit Data length.

2 (9_BIT_DATA_LENGTH): 9 bit data length. The 9th bit is commonly used for addressing in multidrop mode. See the ADDRDET bit in the CTL register.

3 (RESERVED): Reserved.

PARITYSEL

Selects what type of parity is used by the USART.

0 (NO_PARITY): No parity.

1 (RESERVED): Reserved.

2 (EVEN_PARITY): Even parity. Adds a bit to each character such that the number of 1s in a transmitted character is even, and the number of 1s in a received character is expected to be even.

3 (ODD_PARITY): Odd parity. Adds a bit to each character such that the number of 1s in a transmitted character is odd, and the number of 1s in a received character is expected to be odd.

STOPLEN

Number of stop bits appended to transmitted data. Only a single stop bit is required for received data.

0 (1_STOP_BIT): 1 stop bit.

1 (2_STOP_BITS): 2 stop bits. This setting should only be used for asynchronous communication.

RESERVED

Reserved. Only write 0 to this bit.

MODE32K

Selects standard or 32 kHz clocking mode.

0 (UART_USES_STANDARD_C): UART uses standard clocking.

1 (UART_USES_THE_32_KHZ): UART uses the 32 kHz clock from the RTC oscillator as the clock source to the BRG, and uses a special bit clocking scheme.

RESERVED

Reserved. Read value is undefined, only zero should be written.

CTSEN

CTS Enable. Determines whether CTS is used for flow control. CTS can be from the input pin, or from the USART’s own RTS if loopback mode is enabled. See Section 24.7.4 for more information.

0 (NO_FLOW_CONTROL): No flow control. The transmitter does not receive any automatic flow control signal.

1 (FLOW_CONTROL_ENABLED): Flow control enabled. The transmitter uses the CTS input (or RTS output in loopback mode) for flow control purposes.

RESERVED

Reserved. Read value is undefined, only zero should be written.

SYNCEN

Selects synchronous or asynchronous operation.

0 (ASYNCHRONOUS_MODE_IS): Asynchronous mode is selected.

1 (SYNCHRONOUS_MODE_IS): Synchronous mode is selected.

CLKPOL

Selects the clock polarity and sampling edge of received data in synchronous mode.

0 (FALLING_EDGE): Falling edge. Un_RXD is sampled on the falling edge of SCLK.

1 (RISING_EDGE): Rising edge. Un_RXD is sampled on the rising edge of SCLK.

RESERVED

Reserved. Read value is undefined, only zero should be written.

SYNCMST

Synchronous mode Master select.

0 (SLAVE): Slave. When synchronous mode is enabled, the USART is a slave.

1 (MASTER): Master. When synchronous mode is enabled, the USART is a master.

LOOP

Selects data loopback mode.

0 (NORMAL_OPERATION): Normal operation.

1 (LOOPBACK_MODE): Loopback mode. This provides a mechanism to perform diagnostic loopback testing for USART data. Serial data from the transmitter (Un_TXD) is connected internally to serial input of the receive (Un_RXD). Un_TXD and Un_RTS activity will also appear on external pins if these functions are configured to appear on device pins. The receiver RTS signal is also looped back to CTS and performs flow control if enabled by CTSEN.

RESERVED

Reserved. Read value is undefined, only zero should be written.

OETA

Output Enable Turnaround time enable for RS-485 operation.

0 (DISABLED): Disabled. If selected by OESEL, the Output Enable signal deasserted at the end of the last stop bit of a transmission.

1 (ENABLED): Enabled. If selected by OESEL, the Output Enable signal remains asserted for one character time after the end of the last stop bit of a transmission. OE will also remain asserted if another transmit begins before it is deasserted.

AUTOADDR

Automatic Address matching enable.

0 (DISABLED): Disabled. When addressing is enabled by ADDRDET, address matching is done by software. This provides the possibility of versatile addressing (e.g. respond to more than one address).

1 (ENABLED): Enabled. When addressing is enabled by ADDRDET, address matching is done by hardware, using the value in the ADDR register as the address to match.

OESEL

Output Enable Select.

0 (STANDARD): Standard. The RTS signal is used as the standard flow control function.

1 (RS_485): RS-485. The RTS signal configured to provide an output enable signal to control an RS-485 transceiver.

OEPOL

Output Enable Polarity.

0 (LOW): Low. If selected by OESEL, the output enable is active low.

1 (HIGH): High. If selected by OESEL, the output enable is active high.

RXPOL

Receive data polarity.

0 (STANDARD): Standard. The RX signal is used as it arrives from the pin. This means that the RX rest value is 1, start bit is 0, data is not inverted, and the stop bit is 1.

1 (INVERTED): Inverted. The RX signal is inverted before being used by the UART. This means that the RX rest value is 0, start bit is 1, data is inverted, and the stop bit is 0.

TXPOL

Transmit data polarity.

0 (STANDARD): Standard. The TX signal is sent out without change. This means that the TX rest value is 1, start bit is 0, data is not inverted, and the stop bit is 1.

1 (INVERTED): Inverted. The TX signal is inverted by the UART before being sent out. This means that the TX rest value is 0, start bit is 1, data is inverted, and the stop bit is 0.

RESERVED

Reserved. Read value is undefined, only zero should be written.

Links

()